{if $MvcInfo.resourcetxt}
	<div>{$MvcInfo.resourcetxt}</div>
{/if}

{if $params.action=="index"}

	<div class="SearchForm">
		<form method="GET">
			<input class="query" type="text" name="query" value="{$params.query|htmlspecialchars}" maxlength="255" />
			<input type="submit" value="Найти" />
		</form>
	</div>

	{if $SearchResults}
	
		{include file="default/helpers/paginator.tpl"}
	
		<div>{$smarty.capture.Paginate}</div>

		<ol class="Search" start="{$Paginator->itemCountPerPage*($Paginator->current-1)+1}">
			{foreach from=$SearchResults item=data}
				<li>
					<div class="SearchHead"><b><a href="{$cnf.baseurl}{$data.resulturl}">{$data.resultname}</a></b></div>
					<div class="SearchText">{$data.resultdescr}</div>
					<div class="SearchLink"><a href="{$cnf.baseurl}{$data.resulturl}">http://{$smarty.server.HTTP_HOST}{$cnf.baseurl}{$data.resulturl}</a></div>
				</li>
			{/foreach}
		</ol>
		
		<div>{$smarty.capture.Paginate}</div>
	
	{/if}

{/if}
